<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>文章管理</title>
    <link type="text/css" rel="stylesheet" href="http://127.0.0.1/l/Static/hdjs/hdui.css"/>
    <link type="text/css" rel="stylesheet" href="http://127.0.0.1/l/Static/bootstrap/css/bootstrap.min.css"/>
</head>
<body>
<div class="wrap">
    <table class="table2">
        <thead>
        <tr>
            <td width="50">id</td>
            <td width="170">商品名称</td>
            <td width="170">描述</td>
            <td width="80">价格</td>
            <td width="170">甜度</td>
            <td width="70">月销量</td>
            <td width="170">累计评论</td>
            <td width="170">添加时间</td>
            <td width="170">所属分类(<a href="<?php echo U('index');?>">全部</a>)</td>
            <td width="150">操作</td>
        </tr>
        </thead>
        <tbody>
        	<?php foreach ($data as $k=>$v){?>
        		<tr>
                    <!-- 商品ID -->
		            <td width="50"><?php echo $v['coid'];?></td>
                    <!-- 商品名称 -->
		            <td width="170">
		            	<a href="" target="_blank"><?php echo $v['coname'];?></a>
		            </td>
                    <!-- 商品描述 -->
                    <td width="170"><?php echo $v['codes'];?></td>
                    <!-- 商品价格 -->
		            <td width="80"><?php echo $v['copice'];?></td>
                    <!-- 商品甜度 -->
		            <td width="170"><?php echo $v['sweet'];?></td>
                    <!-- 商品月销量 -->
		            <td width="70"><?php echo $v['cosales'];?></td>
                    <!-- 商品累计评价 -->
                    <td width="170"><?php echo $v['coacc'];?></td>
                    <!-- 商品添加时间 -->
                    <td width="170"><?php echo date('Y-m-d H:i:s',$v['sendtime']);?></td>
                    <!-- 商品所属分类 -->
		            <td width="170">
                        <a href="<?php echo U('index',array('cid'=>$v['cid']));?>"><?php echo $v['cname'];?></a>
                    </td>
                    <!-- 商品操作 -->
		            <td width="150">
						<a href="<?php echo U('Article/edit',array('aid'=>$v['aid']));?>" class="btn btn-primary btn-xs">编辑</a>
                        <a href="<?php echo U('Article/edit',array('aid'=>$v['aid']));?>" class="btn btn-primary btn-xs">查看评论</a>
                        <a href="javascript:;" class="btn btn-warning btn-xs" onclick="if(confirm('确定删除吗？')) location.href='<?php echo U('Article/del',array('aid'=>$v['aid']));?>'">删除</a>
		            </td>
	        	</tr>
        	<?php }?>
            
        </tbody>
    </table>
    <div class="page_cms">
      	<?php echo $page;?>
    </div>
</div>

</body>
</html>


